libxl: Make domain_shutdown fail if graceful not possible
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 20 Jan 2011 17:04:06 +0000 (17:04 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 20 Jan 2011 17:04:06 +0000 (17:04 +0000)
commitc856ec5f96dd41e1d23528f6051ae6c29f49c716
tree5343002b734b4f78027ccb1b1f95da337b7bfad3
parent44d2b43fc2619ec6e758f9d2305660e01efd2619
libxl: Make domain_shutdown fail if graceful not possible

Currently "xl shutdown" (like "xm shutdown") is not capable of doing
the proper ACPI negotiation with an HVM no-pv-drivers guest which
would be necessary for a graceful shutdown.

Instead (following the ill-advised lead of "xm shutdown") it simply
shoots the guest in the head.

This patch changes the behaviour so that "xl shutdown" fails if the
domain cannot be shut down gracefully for this reason and suggests in
the error message using destroy instead.

Also, check whether the PV shutdown protocol is available before we
try to use it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.c